import { createRouter,createWebHashHistory } from "vue-router"

const routes =[
    {
        path:'/',
        redirect:'/index'
    },
    {
        path:'/index',   //首页
        name:'index',  
        component:()=>import('../views/index/index.vue'),
        children:[
            {
                path:'/index/recommend',  //推荐
                name:'recommend',  
                component:()=>import('../views/index/recommend/index.vue')
            },
            {
                path:'/index/dressing',  //穿搭
                name:'dressing',  
                component:()=>import('../views/index/dressing/index.vue')
            },
            {
                path:'/index/delicacy',  //美食
                name:'delicacy',  
                component:()=>import('../views/index/delicacy/index.vue')
            },
            {
                path:'/index/cosmetics',  //彩妆
                name:'cosmetics',  
                component:()=>import('../views/index/cosmetics/index.vue')
            },
            {
                path:'/index/other',  //彩妆
                name:'other',  
                component:()=>import('../views/index/other/index.vue')
            }
        ]
    },
    {
        path:'/release',  //发现
        name:'release',  
        component:()=>import('../views/release/index.vue')
    },
    {
        path:'/notice',  //通知
        name:'notice',  
        component:()=>import('../views/notice/index.vue')
    },
    {
        path:'/my',  //我的
        name:'my',  
        component:()=>import('../views/my/index.vue')
    },
    {
        path:'/detail',  //详情页
        name:'detail',  
        component:()=>import('../views/detail/index.vue')
    },
]

const router = createRouter ({
    history: createWebHashHistory(),
    routes,
    linkActiveClass:'active'
})
export default router